/* plus_symbol.h */

#ifndef DODO_PLUS_SYMBOL_H
#define DODO_PLUS_SYMBOL_H

#include <dodo_plot/symbol/symbol_base.h>
#include <dodo_plot/kernel/plotter.h>

namespace dodo_plot
{

class Plus_Symbol : public Symbol_Base
{
public:
	Plus_Symbol(double size = 10, double line_width = 1, 
		const Color& line_color = color_name::BLACK)
		: Symbol_Base(size, line_width, line_color, color_name::TRANSPARENT)
	{ }
	void draw(const Plotter& plotter) const
	{
		Point p = plotter.get_abs_point(0, 0);
		plotter.save();
		plotter.begin_new_path();
		plotter.set_color(line_color_);
		plotter.set_line_width(line_width_);
		plotter.abs_move_to(p.x - size_ * 0.5, p.y);
		plotter.abs_rel_line_to(size_, 0);
		plotter.abs_move_to(p.x, p.y - size_ * 0.5);
		plotter.abs_rel_line_to(0, size_);
		plotter.stroke();
		plotter.restore();
	}
private:

};

}

#endif //DODO_PLUS_SYMBOL_H

